# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.Partners.V2.Model.Lead do
  @moduledoc """
  A lead resource that represents an advertiser contact for a &#x60;Company&#x60;. These are usually generated via Google Partner Search (the advertiser portal).

  ## Attributes

  - adwordsCustomerId (String.t): The AdWords Customer ID of the lead. Defaults to: `null`.
  - comments (String.t): Comments lead source gave. Defaults to: `null`.
  - createTime (DateTime.t): Timestamp of when this lead was created. Defaults to: `null`.
  - email (String.t): Email address of lead source. Defaults to: `null`.
  - familyName (String.t): Last name of lead source. Defaults to: `null`.
  - givenName (String.t): First name of lead source. Defaults to: `null`.
  - gpsMotivations ([String.t]): List of reasons for using Google Partner Search and creating a lead. Defaults to: `null`.
    - Enum - one of 
  - id (String.t): ID of the lead. Defaults to: `null`.
  - languageCode (String.t): Language code of the lead&#39;s language preference, as defined by &lt;a href&#x3D;\&quot;https://tools.ietf.org/html/bcp47\&quot;&gt;BCP 47&lt;/a&gt; (IETF BCP 47, \&quot;Tags for Identifying Languages\&quot;). Defaults to: `null`.
  - marketingOptIn (boolean()): Whether or not the lead signed up for marketing emails Defaults to: `null`.
  - minMonthlyBudget (Money): The minimum monthly budget lead source is willing to spend. Defaults to: `null`.
  - phoneNumber (String.t): Phone number of lead source. Defaults to: `null`.
  - state (String.t): The lead&#39;s state in relation to the company. Defaults to: `null`.
    - Enum - one of [LEAD_STATE_UNSPECIFIED, LEAD, CONTACTED, CLIENT, OTHER]
  - type (String.t): Type of lead. Defaults to: `null`.
    - Enum - one of [LEAD_TYPE_UNSPECIFIED, LT_GPS]
  - websiteUrl (String.t): Website URL of lead source. Defaults to: `null`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :adwordsCustomerId => any(),
          :comments => any(),
          :createTime => DateTime.t(),
          :email => any(),
          :familyName => any(),
          :givenName => any(),
          :gpsMotivations => list(any()),
          :id => any(),
          :languageCode => any(),
          :marketingOptIn => any(),
          :minMonthlyBudget => GoogleApi.Partners.V2.Model.Money.t(),
          :phoneNumber => any(),
          :state => any(),
          :type => any(),
          :websiteUrl => any()
        }

  field(:adwordsCustomerId)
  field(:comments)
  field(:createTime, as: DateTime)
  field(:email)
  field(:familyName)
  field(:givenName)
  field(:gpsMotivations, type: :list)
  field(:id)
  field(:languageCode)
  field(:marketingOptIn)
  field(:minMonthlyBudget, as: GoogleApi.Partners.V2.Model.Money)
  field(:phoneNumber)
  field(:state)
  field(:type)
  field(:websiteUrl)
end

defimpl Poison.Decoder, for: GoogleApi.Partners.V2.Model.Lead do
  def decode(value, options) do
    GoogleApi.Partners.V2.Model.Lead.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Partners.V2.Model.Lead do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
